package com.xmd.red.service;

import org.apache.commons.lang3.time.FastDateFormat;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * Created by superbone on 2016/11/2.
 */
@Service
public class ScheduledTest {

    //@Scheduled(fixedDelay = 1000)
    public void execute(){

        Date date = new Date();
        FastDateFormat fdf = FastDateFormat.getInstance("yyyy-MM-dd HH:mm:ss");
        System.out.println(fdf.format(date));
    }
}
